package com.yanfan.usersmart.user;

import com.google.gson.Gson;

import java.util.Map;

public class MapToEntityUtil {
    public static <T> T mapToEntity(Map<String, Object> map, Class<T> clazz) {
        Gson gson = new Gson();
        String json = gson.toJson(map);
        return gson.fromJson(json, clazz);
    }
}
